import { defineStore } from 'pinia';

export const useRoleStore = defineStore('role', {
    state: () => ({
        count: 1
    }),
    // 定义getters
    getters: {
        doubleCount: (state) => state.count * 2,
        getCount() {
            return this.doubleCount;
        }
    },
    actions: {
        increment() {
            this.count++;
        }
    }
});